
* ************************************************** * 
*   ANALYSIS                                         *
*                                                    *
*   Input File:    - DataAll.dta                     * 
*                  - IndividualData.dta              *           
* *************************************************  * 


* load the data:
use "DataAll.dta", clear

	
** TABLE 1: SINGLE ANCESTRY **

	* TABLE 1 Model 1
reg reppercent2016 German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016
	* TABLE 1 Model 2
reg dempercent2016 German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016
	* TABLE 1 Model 3
reg DiffRepDem2016 German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016


 ******************************************************************************
 ******************************************************************************
 
 
** TABLE 2: SINGLE ANCESTRY ** 

	* TABLE 2 Model 4
reg DiffRepRep20162012 German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016
	* TABLE 2 Model 5
reg DifDifRepRep German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016	


 ******************************************************************************
 ******************************************************************************
 

** TABLE 3: SINGLE ANCESTRY ** 

	* TABLE 3 Model 6
logit swing_state_dummy2016 German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016
	
	
 ******************************************************************************
 ******************************************************************************
 

** TABLE 6: BIRTHPLACE ** 

	* TABLE 6 Model 10
logit SwingCountyDummy19201916 GermanBirthPlace1910 IrishBirthPlace1910 ItalianBirthPlace1910


 ******************************************************************************
 ******************************************************************************
 
 
** TABLE 7 ** 

	* TABLE 7 Model 11
reg reppercent2016 REP1920 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016 
	* TABLE 7 Model 12
reg reppercent2016 REP1920 German_share_single2016 American_share_single2016 English_share_single2016 Irish_share_single2016 Italian_share_single2016 NoCollegeDegree IncomeDiffToNatMedianIncome dummy_american_south2016 


 ******************************************************************************
 ******************************************************************************
 
 
** TABLE 8: La Follette 1924 election ** 

	* TABLE 8 Model 13
reg PROG1924 GermanBirthPlace1910 IrishBirthPlace1910 ItalianBirthPlace1910 


 ******************************************************************************
 ******************************************************************************
 

** TABLE 4: Swing-state counties 2016 **
		
keep if swing_state_dummy2016 == 1	// 490 countries remain	

* generate the dominance measure and code ancestry as 0 where the ancestry is not dominant (-> not first highest)

gen GermanDom2016 = .
replace GermanDom2016 = 0 if GermanFirstHighest2016 == 0
replace GermanDom2016 = dominance2016 if GermanFirstHighest2016 == 1

gen AmericanDom2016 = .
replace AmericanDom2016 = 0 if AmericanFirstHighest2016 == 0
replace AmericanDom2016 = dominance2016 if AmericanFirstHighest2016 == 1


	* TABLE 4 Model 7
logit swing_county_dummy2016 GermanDom2016 AmericanDom2016

	
 ******************************************************************************
 ******************************************************************************

 
use "IndividualData.dta", clear

** TABLE 5 ** 

	* TABLE 5 Model 8
logit VoteTrumpVsClinton age gender educ faminc RepPID AgainstHelpUN AgainstFreeTrade  NoPID interaction1 interaction2  
	* TABLE 5 Model 9
logit VoteTrumpVsClinton age gender educ faminc RepPID AgainstHelpUN AgainstFreeTrade  NoPID interaction1 interaction2 if GerDominant2016 == 1

clear

************************************* END **************************************


